const Router = require('koa-router')

const roleRouter = new Router({prefix:'/roles'})
const { verifyAuth } = require('../middleware/authMiddleware')
const {
  getUserRole,
  getRoles,
  updateRole,
  removeRole
} = require('../controller/roleController')
roleRouter.get('/:id', verifyAuth, getUserRole)

roleRouter.post('/list', verifyAuth, getRoles)

roleRouter.patch('/:id', verifyAuth, updateRole)

roleRouter.delete('/:id',verifyAuth,removeRole)
module.exports = roleRouter